<template>
  <div class="app-container">
    <el-form :inline="true" ref="ruleForm" :model="formInline" class="demo-form-inline">
      <el-form-item label="操作时间" prop="Time">
        <el-date-picker
          v-model="formInline.Time"
          type="datetimerange"
          align="right"
          unlink-panels
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          value-format="yyyy-MM-dd HH:mm:ss"
          :default-time="['00:00:00', '23:59:59']"
          :picker-options="pickerWeekStep">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="账号名" prop="username">
            <el-input v-model="formInline.username" placeholder="请输入账号名" @keyup.enter.native="handleFilter"></el-input>
      </el-form-item>
      <el-form-item label="锁定状态" prop="lockStatus">
        <el-select v-model="formInline.lockStatus" placeholder="请选择状态">
          <el-option
          v-for="item in vipManage.MEMBER_VIP_LUCK_STATUS"
          :label="item.label"
            :key="item.value"
          :value="item.value">
          </el-option>
        </el-select>
      </el-form-item>

      <el-button class="filter-item" type="primary" :loading="loading" icon="el-icon-search" @click="handleFilter">搜索
      </el-button>
      <el-button @click="selfResetForm('ruleForm')">重置</el-button>
    </el-form>
  </div>

</template>

<script>

import { form, pickerOption } from '@/build';


export default {
  name: 'form-filter',
  mixins: [form, pickerOption],
  data() {
    return {
      levelList: [],
      formInline: {
        username: '',
        Time: [
          moment().format('YYYY-MM-DD 00:00:00'),
          moment().format('YYYY-MM-DD 23:59:59'),
        ],
        page: 1,
        size: 20,
        lockStatus: '',
      },
    };
  },
  methods: {
    handleFilter() {
      this.$emit('on-filter', this.formInline);
    },
    selfResetForm(formname) {
      this.resetForm(formname);
      this.handleFilter();
    },
  },
  mounted() {
  },
};
</script>

<style lang="scss" scoped>
</style>
